package domain;

import java.io.Serializable;
import java.util.Arrays;
import java.util.List;

import domain.extra.Column;
import domain.extra.Result;

public class ColumnBet extends Bet implements Serializable {
	private Column column; 
	private int chips; 
	
	public ColumnBet() {
	}
	
	public ColumnBet(Column column, int chips) {
		this.chips= chips; 
		this.column = column; 
	}

	@Override
	public int gain() {
		return (this.getCount()*12);
	}
	
	@Override
	public boolean win(Result r) {
		return this.column.equals(r.getColumn());
	}

	@Override
	public List getOptions() {
		return Arrays.asList(Column.values());
	}

	@Override
	public String getDescription() {
		return "ColumnBet";
	}

	@Override
	public void typeOption(Object type) {
		this.column= (Column) type;
	}
	
}
